Optimal. Leaf size=49 \[ \frac {a A \sin (c+d x)}{d}+\frac {a (A+B) \sin ^2(c+d x)}{2 d}+\frac {a B \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2912, 45}
\begin {gather*} \frac {a (A+B) \sin ^2(c+d x)}{2 d}+\frac {a A \sin (c+d x)}{d}+\frac {a B \sin ^3(c+d x)}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2912
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac {\text {Subst}\left (\int (a+x) \left (A+\frac {B x}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\text {Subst}\left (\int \left (a A+(A+B) x+\frac {B x^2}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {a A \sin (c+d x)}{d}+\frac {a (A+B) \sin ^2(c+d x)}{2 d}+\frac {a B \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.28, size = 46, normalized size = 0.94 \begin {gather*} -\frac {a (-2 (6 A+B) \sin (c+d x)+\cos (2 (c+d x)) (3 (A+B)+2 B \sin (c+d x)))}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 44, normalized size = 0.90
method | result | size |
derivativedivides | \(\frac {\frac {a B \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {\left (a A +a B \right ) \left (\sin ^{2}\left (d x +c \right )\right )}{2}+A \sin \left (d x +c \right ) a}{d}\) | \(44\) |
default | \(\frac {\frac {a B \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {\left (a A +a B \right ) \left (\sin ^{2}\left (d x +c \right )\right )}{2}+A \sin \left (d x +c \right ) a}{d}\) | \(44\) |
risch | \(\frac {a A \sin \left (d x +c \right )}{d}+\frac {a B \sin \left (d x +c \right )}{4 d}-\frac {\sin \left (3 d x +3 c \right ) a B}{12 d}-\frac {a \cos \left (2 d x +2 c \right ) A}{4 d}-\frac {a \cos \left (2 d x +2 c \right ) B}{4 d}\) | \(75\) |
norman | \(\frac {\frac {\left (2 a A +2 a B \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (2 a A +2 a B \right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a \left (3 A +2 B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) | \(124\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 42, normalized size = 0.86 \begin {gather*} \frac {2 \, B a \sin \left (d x + c\right )^{3} + 3 \, {\left (A + B\right )} a \sin \left (d x + c\right )^{2} + 6 \, A a \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 48, normalized size = 0.98 \begin {gather*} -\frac {3 \, {\left (A + B\right )} a \cos \left (d x + c\right )^{2} + 2 \, {\left (B a \cos \left (d x + c\right )^{2} - {\left (3 \, A + B\right )} a\right )} \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.14, size = 75, normalized size = 1.53 \begin {gather*} \begin {cases} \frac {A a \sin ^{2}{\left (c + d x \right )}}{2 d} + \frac {A a \sin {\left (c + d x \right )}}{d} + \frac {B a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {B a \sin ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\left (c \right )}\right ) \left (a \sin {\left (c \right )} + a\right ) \cos {\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 52, normalized size = 1.06 \begin {gather*} \frac {2 \, B a \sin \left (d x + c\right )^{3} + 3 \, A a \sin \left (d x + c\right )^{2} + 3 \, B a \sin \left (d x + c\right )^{2} + 6 \, A a \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 40, normalized size = 0.82 \begin {gather*} \frac {\frac {B\,a\,{\sin \left (c+d\,x\right )}^3}{3}+\frac {a\,\left (A+B\right )\,{\sin \left (c+d\,x\right )}^2}{2}+A\,a\,\sin \left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________